/*将这个类放到classtest下面*/
package clazz;

/**
 * @description:重载和重写的区别
 * @author: Lidong
 * @time: 2020/5/22 21:54
 **/
public class OverWriteAndOverload {

    /**
     * 重载：同名不同参返回值无关
     */
    public double test1(double x, double y) {
        return x + y;
    }

    public double test1(double x, double y, double z) {
        return x + y + z;
    }

    public double test1(int x, int y) {
        return x + y;
    }

    /*不是重载，与返回的参数无关*/
    public void test(double x,double y){

    }

}
